package com.study.springcloud.controll;

import com.study.springcloud.domain.UserDomain;
import com.study.springcloud.mapper.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author chaos-supreme(混沌至尊):raoluping
 * @Date 2017/10/27 13:55
 * @ProjectName springcloudfather
 * @Description
 */
@RestController
@RequestMapping("/dbservice")
public class userDomainControll {
  @Autowired
  private UserDao userDao;

  @RequestMapping("/queryUserById")
  public @ResponseBody
  UserDomain queryUserByID(@RequestParam String id) {
    return userDao.getUserByKey(Integer.valueOf(id));
  }
}
